package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.SysUserUsertype;
import com.ruoyi.system.mapper.SysUserUsertypeMapper;
import com.ruoyi.system.service.ISysUserUsertypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Set;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ruoyi
 * @date 2022-09-30
 */
@Service
public class SysUserUsertypeServiceImpl implements ISysUserUsertypeService
{
    @Autowired
    private SysUserUsertypeMapper sysUserUsertypeMapper;


    /**
     * 查询【请填写功能名称】
     *
     * @param userId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public SysUserUsertype selectSysUserUsertypeByUserId(Long userId)
    {
        return sysUserUsertypeMapper.selectSysUserUsertypeByUserId(userId);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param sysUserUsertype 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<SysUserUsertype> selectSysUserUsertypeList(SysUserUsertype sysUserUsertype)
    {
        return sysUserUsertypeMapper.selectSysUserUsertypeList(sysUserUsertype);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param sysUserUsertype 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertSysUserUsertype(SysUserUsertype sysUserUsertype)
    {
        return sysUserUsertypeMapper.insertSysUserUsertype(sysUserUsertype);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param sysUserUsertype 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateSysUserUsertype(SysUserUsertype sysUserUsertype)
    {
        return sysUserUsertypeMapper.updateSysUserUsertype(sysUserUsertype);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param userIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteSysUserUsertypeByUserIds(Long[] userIds)
    {
        return sysUserUsertypeMapper.deleteSysUserUsertypeByUserIds(userIds);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param userId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteSysUserUsertypeByUserId(Long userId)
    {
        return sysUserUsertypeMapper.deleteSysUserUsertypeByUserId(userId);
    }

    @Override
    public Set<String> getUsertypes(Long userId) {
        return sysUserUsertypeMapper.selectUserTypeNameByUserId(userId);
    }
}
